<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('第三方支付记录列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>用户手机号：</p>
                                <input type="text" name="userPhone"/>
                            </li>
                            <li>
                                <p>内部订单号：</p>
                                <input type="text" name="orderNo"/>
                            </li>
                            <li>
                                <p>业务类型：</p>
                                <select name="businessType" th:with="type=${@dict.getType('business_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>支付类型：</p>
                                <select name="payType" th:with="type=${@dict.getType('pay_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>商户号：</p>
                                <input type="text" name="ino"/>
                            </li>
<!--                            <li>-->
<!--                                <p>支付金额：</p>-->
<!--                                <input type="text" name="payMoney"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <p>支付流水单号：</p>-->
<!--                                <input type="text" name="outTradeNo"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <p>请求数据：</p>-->
<!--                                <input type="text" name="request"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <p>银行流水号或支付渠道号：</p>-->
<!--                                <input type="text" name="payTypeOrderNo"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <p>支付成功返回的数据：</p>-->
<!--                                <input type="text" name="response"/>-->
<!--                            </li>-->
                            <li class="select-time">
                                <p>响应时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginResponseTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endResponseTime]"/>
                            </li>
                            <li>
                                <p>状态</p>
<!--                                <select name="payStatus">-->
<!--                                    <option value="">所有</option>-->
<!--                                </select>-->
                                <select name="payStatus" th:with="type=${@dict.getType('pay_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
<!--                            <li>-->
<!--                                <p>0：正常；1：手动补单：</p>-->
<!--                                <select name="handleStatus">-->
<!--                                    <option value="">所有</option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <p>删除标记 0删除 1显示）：</p>-->
<!--                                <input type="text" name="dataFlag"/>-->
<!--                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

<!--            <div class="btn-group-sm" id="toolbar" role="group">-->
<!--                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="zangchat:thirdpay:add">-->
<!--                    <i class="fa fa-plus"></i> 添加-->
<!--                </a>-->
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="zangchat:thirdpay:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="zangchat:thirdpay:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="zangchat:thirdpay:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                 </a>-->
<!--            </div>-->
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('zangchat:thirdpay:edit')}]];
        var removeFlag = [[${@permission.hasPermi('zangchat:thirdpay:remove')}]];
        var businessTypeDatas = [[${@dict.getType('business_type')}]];
        var payTypeDatas = [[${@dict.getType('pay_type')}]];
        var payStatustaDatas = [[${@dict.getType('pay_status')}]];
        var prefix = ctx + "zangchat/thirdpay";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "第三方支付记录",
                columns: [{
                    checkbox: true
                },
                // {
                //     field : 'id',
                //     title : '主键',
                //     visible: false
                // },
                {
                    field : 'userPhone',
                    title : '用户手机号'
                },
                {
                    field : 'orderNo', 
                    title : '内部订单号'
                },
                {
                    field : 'businessType', 
                    title : '业务类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(businessTypeDatas, value);
                    }
                },
                {
                    field : 'payType', 
                    title : '支付类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(payTypeDatas, value);
                    }
                },
                {
                    field : 'ino', 
                    title : '商户号'
                },
                {
                    field : 'payMoney', 
                    title : '支付金额'
                },
                {
                    field : 'outTradeNo', 
                    title : '支付流水单号'
                },
                {
                    field : 'request', 
                    title : '请求数据'
                },
                {
                    field : 'payTypeOrderNo', 
                    title : '银行流水号或支付渠道号'
                },
                {
                    field : 'response', 
                    title : '支付成功返回的数据'
                },
                {
                    field : 'responseTime', 
                    title : '响应时间'
                },
                {
                    field : 'payStatus', 
                    title : '状态',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(payStatustaDatas, value);
                    }
                },
                // {
                //     field : 'handleStatus',
                //     title : '0：正常；1：手动补单'
                // },
                {
                    field : 'remark', 
                    title : '备注'
                },
                // {
                //     field : 'dataFlag',
                //     title : '删除标记 0删除 1显示）'
                // },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>